﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DapperExtensions.Mapper;
using ZLWeb.WebApiEntity.MemberCard;
using ZLWeb.WebApiEntityBase;

namespace ZLWeb.WebApiEntity.WechatCardModel
{
    public class WxShowInfo : ResponseResultInfo
    {
        private string _ucode = string.Empty;
        private string _ucardid = string.Empty;

        /// <summary>
        ///  账户状态标识（0-正常 2-休眠）
        /// </summary>
        public short accsta { get; set; }

        /// <summary>
        ///  状态描述
        /// </summary>
        public string accstasm { get; set; }

        /// <summary>
        ///  折扣类别id
        /// </summary>
        public int accdisid { get; set; }

        /// <summary>
        ///  折扣类别名称(仅用于微信卡包显示等级)（服务端读取缓存获得）
        /// </summary>
        public string accdismc { get; set; }

        /// <summary>
        ///  总余额：现金+增值（不含红包）
        /// </summary>
        public decimal accbalance { get; set; }

        /// <summary>
        ///  总积分：可兑换积分
        /// </summary>
        public int accjf { get; set; }

        /// <summary>
        ///  微信会员卡卡号
        /// </summary>
        public string wxcardno { get; set; }

        public string ucode
        {
            get { return _ucode; }
            set { _ucode = value; }
        }

        public string ucardid
        {
            get { return _ucardid; }
            set { _ucardid = value; }
        }

        /// <summary>
        /// 卡种id
        /// </summary>
        public int acccgsid { get; set; }
        

    }

    public class WxShowInfoMapper : ClassMapper<WxShowInfo>
    {
        public WxShowInfoMapper()
        {
            Table("#WxShowInfo");
            Map(f => f.accsta).Column("accsta");
            Map(f => f.accstasm).Column("accstasm");
            Map(f => f.accdisid).Column("accdisid");
            Map(f => f.accdismc).Column("accdismc");
            Map(f => f.accbalance).Column("accbalance");
            Map(f => f.accjf).Column("accjf");
            Map(f => f.wxcardno).Column("wxcardno");
            Map(f => f.ucode).Column("wxcardcode");
            Map(f => f.ucardid).Column("wxcardid");
            Map(f => f.acccgsid).Column("acccgsid");
        }
    }
}
